package com.hzjy.api.service.impl;

import com.hzjy.api.mapper.ApiTradeNewsMapper;
import com.hzjy.common.utils.PageData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 行业新闻资讯
 * @author SS
 */
@Service
public class ApiTradeNewsServiceImpl {
    @Autowired
    private ApiTradeNewsMapper apiTradeNewsMapper;

    /**
     * 获取首页的行业资讯
     * @return
     */
    public List<PageData> getIndexTradeNews(){
        return apiTradeNewsMapper.getIndexTradeNews();
    }

    /**
     * 获取资讯详情
     * @param tradeNewsId
     * @return
     */
    public PageData getTradeNewsById(Long tradeNewsId){
        return apiTradeNewsMapper.getTradeNewsById(tradeNewsId);
    }
    /**
     * 获取资讯列表
     */
    public List<PageData> getTreadeNewsList(PageData pageData){
        return apiTradeNewsMapper.getTreadeNewsList(pageData);
    }
    /**
     * 获取资讯页数
     */
    public Integer getTreadeNewsNum(){
        return apiTradeNewsMapper.getTreadeNewsNum();
    }
}
